<div class="layui-layout layui-layout-admin" style="padding-left: 40px;margin-top: 20px; " >
    <form class="layui-form" >
        <div class="layui-form-item"  >
            <h2 style = "text-indent:6em"> 
                解绑用户【
                <font color="#104E8B" id = "uctrname" ></font>
                】的手机
            </h2>
        </div>
         <div class="layui-form-item" >
            <label class="layui-form-label" style="width:100px;">游戏推广号：</label>
            <div class="layui-form-mid">
                <font color="#104E8B" id = "uctrlGameID"></font>
            </div>    
        </div>
        <div class="layui-form-item" >
            <label class="layui-form-label"  style="width:100px;">原因：</label>
            <div class="layui-input-block">
                    <textarea style="height:100px;width:400px" name="ctrlreson" id="ctrlreson" placeholder="请输入内容" lay-verify="required" class="layui-textarea" maxlength="127"></textarea>
            </div>
           
        </div>


        <div class="layui-form-item" >
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" lay-filter="useroprater">确定解绑</button>
            </div>
        </div>
    </form>
</div>
<script>
var $;
    layui.config({
            base : "js/"
    }).use(['form','element','layer','jquery'],function(){
        var form = layui.form; //只有执行了这一步，部分表单元素才会自动修饰成功
        var $ = layui.jquery;

        ShowContlrDatas();
        form.on('submit(useroprater)', function(data){
            var szReson = document.getElementById("ctrlreson");
            var form_data = {
                 'uCtrlType': [|.uCtrlType|]
                 ,'uCtrlUserID': localStorage["gameid"]
                 ,'uCtrlName': localStorage["unickname"]
                 ,'uCtrlReaSonStr': szReson.value
            }
            layer.confirm('你确定要解绑用户：【'+ localStorage["unickname"]+'】的手机吗？', function(index){
                $.post('[|urlfor "UsersFinduserController.UserContrlInfo"|]', form_data, function (out) {
                    if (out.status == 0) {
                        layer.msg(out.message,{icon: 1},function () {
                            window.location.reload()
                        })
                    } else {
                        layer.msg(out.message)
                    }
                }, "json");
            });
            return false;
        });
    return false;
}); 
function ShowContlrDatas(){
    var uctrname =  document.getElementById("uctrname");
    uctrname.innerHTML=localStorage["unickname"];
    var uctrlGameID =  document.getElementById("uctrlGameID");
    uctrlGameID.innerHTML=localStorage["gameid"];
    
}
</script>